import pandas as pd
import numpy as np

data = {
    "日期": pd.date_range("2024-01-01", periods=10, freq="D"),
    "产品": ["手机", "笔记本", "平板", "手机", "笔记本", "平板", "手机", "笔记本", "平板", "手机"],
    "销量": [100, 80, 60, 110, np.nan, 75, 95, 95, 70, 50],
    "单价": [3000, 5000, 2500, 3100, 4900, np.nan, 3050, 5200, 2600, 2950]
}

df = pd.DataFrame(data)

df = df.set_index("日期")
print("\n前五行：")
print(df.iloc[:5])

print("\n销量>90：")
print(df[df["销量"] > 90])

print("\n仅手机：")
print(df[df["产品"] == "手机"])